<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/H-ui/lib/html5.js"></script>
<script type="text/javascript" src="/Public/H-ui/lib/respond.min.js"></script>
<script type="text/javascript" src="/Public/H-ui/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/h-ui/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/h-ui/static/h-ui/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/h-ui/static/h-ui/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/h-ui/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>后台登录 - 熙街青年公寓</title>
<meta name="keywords" content="熙街青年公寓">
<meta name="description" content="熙街青年公寓">
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header"></div>
<div class="loginWraper">
	<div id="loginform" class="loginBox">
		<form class="form form-horizontal" onsubmit="return false;">
			<div class="row cl">
				<label class="form-label col-xs-3" style="width: 25%"><i class="Hui-iconfont">&#xe60d;</i></label>
				<div class="formControls col-xs-8">
					<input id="user" name="user" type="text" placeholder="账户" class="input-text size-L">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3" style="width: 25%"><i class="Hui-iconfont">&#xe60e;</i></label>
				<div class="formControls col-xs-8">
					<input id="pwd" name="pwd" type="password" placeholder="密码" class="input-text size-L">
				</div>
			</div>
			
			<div class="row cl">
				<label class="form-label col-xs-3" style="width: 25%"></label>
				<div class="formControls col-xs-8 col-xs-offset-3">
					<label for="online">
						<input type="checkbox" name="online" id="online" value=""> 使我保持登录状态
					</label>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3" style="width: 25%"></label>
				<div class="formControls col-xs-8 col-xs-offset-3">
					<input name="submitBtn" id="submitBtn" type="submit" class="btn-login btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
					<input name="" type="reset" class="btn btn-info radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript" src="__PUBLIC__/h-ui/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/h-ui/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/h-ui/lib/layer/2.4/layer.js"></script>
<script>
	var loginInit = function(){
		var data = {};
		var username = $("#user").val();
		if(username.length <= 0 || username.length > 20){
			layer.msg('登陆名输入格式错误');
			return false;
		}else{
			data.uname = username;
		}
		
		var password = $("#pwd").val();
		if(password.length <= 0 || password.length > 20){
			layer.msg('登陆密码输入错误');
			return false;
		}else{
			data.pwds = password;
		}
		
		$.post('index.html', data, function(data){
			if(data.error/1 == 2){
				window.location.href = '/';
			}else{
				layer.msg(data.message, {icon: 0, time: 2000});
			}
		}, "JSON");
	}

	$(document).ready(function(){
		$("#submitBtn").on('click', function(){
			loginInit();
		});

		$("body").keydown(function(){
			if (event.keyCode == "13"){
				loginInit();
			}
		});
	});
</script>
</body>
</html>